import 'package:common/base/base_present.dart';
import 'package:common/mvp/model/node_bean.dart';

import '../model/grid_list_bean.dart';
import '../model/group_list_bean.dart';
import '../model/multi_select_list_bean.dart';
import '../model/native_path_bean.dart';

class HomePresent extends BasePresent{

  static const String kGetMultiSelectListApi = "getMultiSelectList";

  static const String kGetGroupListApi = "getGroupList";

  static const String kGetTreeList = "getTreeList";

  static const String kGetGridList = "getGridList";

  static const String kGetNativePathList = "getNativePathList";

  HomePresent(super.businessResponse);

  /// 多选列表
  void getMultiSelectList(){
    MultiSelectListBean bean = multiSelectListBeanFromJson('{"total":10,"rows":[{"pageSize":null,"pageNumber":null,"orderBy":null,"sort":null,"findAll":null,"intelligentId":"316a23ea6811434a9aaeaab03b677f79","eventTypeid":null,"eventName":"电子围栏","eventNameList":null,"eventType":null,"eventTypeList":null,"eventColorLabel":null,"eventColorLabelList":null,"eventSourcet":"3","reportVideocode":"ef5a1b409739463ab9a3bd9fbf3431eb-0000","reportVideoName":"001-同步-智能任务-","eventPlace":"北京市朝阳区崔各庄乡黄胖子建材批发","coordinatesX":"116.47534366728631","coordinatesY":"40.01833157880153","deviceType":null,"eventGroupName":"乐活雅苑","eventGroupid":null,"eventGroupcode":null,"reportTime":"2022-11-17 09:09:55","misreportFlag":"0","reportFlag":"0","readFlag":"0","pushId":"33694712f6f54e46a0bdf417da4bc36f","eventId":null,"eventAreaName":"北京市/乐活雅苑","eventAreaCode":null,"eventCommunity":"XQ000104","allGroupName":"北京保障房中心/应急指挥信息中心/安全应急部/运营主体1号/乐活雅苑","attachmentUrl":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AF28ea9b38e28d432bb56ebdbaa33d9d64.jpg","attachmentUrlPublic":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AF28ea9b38e28d432bb56ebdbaa33d9d64.jpg","attachmentName":"AF28ea9b38e28d432bb56ebdbaa33d9d64.jpg"},{"pageSize":null,"pageNumber":null,"orderBy":null,"sort":null,"findAll":null,"intelligentId":"aceecffc7cd64ab7bcf3f5b9a6525278","eventTypeid":null,"eventName":"电子围栏","eventNameList":null,"eventType":null,"eventTypeList":null,"eventColorLabel":null,"eventColorLabelList":null,"eventSourcet":"3","reportVideocode":"ef5a1b409739463ab9a3bd9fbf3431eb-0000","reportVideoName":"002-同步-智能任务-","eventPlace":"北京市朝阳区崔各庄乡黄胖子建材批发","coordinatesX":"116.47534366728631","coordinatesY":"40.01833157880153","deviceType":null,"eventGroupName":"乐活雅苑","eventGroupid":null,"eventGroupcode":null,"reportTime":"2022-11-17 21:27:09","misreportFlag":"0","reportFlag":"0","readFlag":"0","pushId":"1108431008804644a81380602b06ad63","eventId":null,"eventAreaName":"北京市/乐活雅苑","eventAreaCode":null,"eventCommunity":"XQ000104","allGroupName":"北京保障房中心/应急指挥信息中心/安全应急部/运营主体1号/乐活雅苑","attachmentUrl":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AFb0ed1ce5613a414bae337bd7a3866fa8.jpg","attachmentUrlPublic":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AFb0ed1ce5613a414bae337bd7a3866fa8.jpg","attachmentName":"AFb0ed1ce5613a414bae337bd7a3866fa8.jpg"},{"pageSize":null,"pageNumber":null,"orderBy":null,"sort":null,"findAll":null,"intelligentId":"1afdc4c8c8f8467996f037c44907c834","eventTypeid":null,"eventName":"电子围栏","eventNameList":null,"eventType":null,"eventTypeList":null,"eventColorLabel":null,"eventColorLabelList":null,"eventSourcet":"3","reportVideocode":"ef5a1b409739463ab9a3bd9fbf3431eb-0000","reportVideoName":"003-同步-智能任务-","eventPlace":"北京市朝阳区崔各庄乡黄胖子建材批发","coordinatesX":"116.47534366728631","coordinatesY":"40.01833157880153","deviceType":null,"eventGroupName":"乐活雅苑","eventGroupid":null,"eventGroupcode":null,"reportTime":"2022-11-17 12:24:53","misreportFlag":"0","reportFlag":"0","readFlag":"0","pushId":"238233003bc44aaabae674993c88c234","eventId":null,"eventAreaName":"北京市/乐活雅苑","eventAreaCode":null,"eventCommunity":"XQ000104","allGroupName":"北京保障房中心/应急指挥信息中心/安全应急部/运营主体1号/乐活雅苑","attachmentUrl":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AF8d8cd3722df94259bf3652cc593d1ddf.jpg","attachmentUrlPublic":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AF8d8cd3722df94259bf3652cc593d1ddf.jpg","attachmentName":"AF8d8cd3722df94259bf3652cc593d1ddf.jpg"},{"pageSize":null,"pageNumber":null,"orderBy":null,"sort":null,"findAll":null,"intelligentId":"872b662b354f49e7ad8cfec1ee195d6b","eventTypeid":null,"eventName":"电子围栏","eventNameList":null,"eventType":null,"eventTypeList":null,"eventColorLabel":null,"eventColorLabelList":null,"eventSourcet":"3","reportVideocode":"ef5a1b409739463ab9a3bd9fbf3431eb-0000","reportVideoName":"004-同步-智能任务-","eventPlace":"北京市朝阳区崔各庄乡黄胖子建材批发","coordinatesX":"116.47534366728631","coordinatesY":"40.01833157880153","deviceType":null,"eventGroupName":"乐活雅苑","eventGroupid":null,"eventGroupcode":null,"reportTime":"2022-10-28 15:16:18","misreportFlag":"0","reportFlag":"0","readFlag":"1","pushId":"0bb65ed5c85c477e8e4c35a80d7f890d","eventId":null,"eventAreaName":"北京市/乐活雅苑","eventAreaCode":null,"eventCommunity":"XQ000104","allGroupName":"北京保障房中心/应急指挥信息中心/安全应急部/运营主体1号/乐活雅苑","attachmentUrl":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AFcb4425370f5343b08df8ace8ba07aa8e.jpg","attachmentUrlPublic":"http://39.155.134.150:10020/QuerySecuritySecneData?ImgID=AFcb4425370f5343b08df8ace8ba07aa8e.jpg","attachmentName":"AFcb4425370f5343b08df8ace8ba07aa8e.jpg"},{"pageSize":null,"pageNumber":null,"orderBy":null,"sort":null,"findAll":null,"intelligentId":"4511d0b75721493191a1a9021eae5088","eventTypeid":null,"eventName":"电子围栏","eventNameList":null,"eventType":null,"eventTypeList":null,"eventColorLabel":null,"eventColorLabelList":null,"eventSourcet":"3","reportVideocode":"ef5a1b409739463ab9a3bd9fbf3431eb-0000","reportVideoName":"005-同步-智能任务-","eventPlace":"北京市朝阳区崔各庄乡黄胖子建材批发","coordinatesX":"116.47534366728631","coordinatesY":"40.01833157880153","deviceType":null,"eventGroupName":"乐活雅苑","eventGroupid":null,"eventGroupcode":null,"reportTime":"2022-11-11 12:03:01","misreportFlag":"0","reportFlag":"0","readFlag":"0","pushId":"22037a140a5540cfbf39aa6deeb061a7","eventId":null,"eventAreaName":"北京市/乐活雅苑","eventAreaCode":null,"eventCommunity":"XQ000104","allGroupName":"北京保障房中心/应急指挥信息中心/安全应急部/运营主体1号/乐活雅苑","attachmentUrl":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AF63cbf7badabf4b88a6c1690dc8f58d40.jpg","attachmentUrlPublic":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AF63cbf7badabf4b88a6c1690dc8f58d40.jpg","attachmentName":"AF63cbf7badabf4b88a6c1690dc8f58d40.jpg"},{"pageSize":null,"pageNumber":null,"orderBy":null,"sort":null,"findAll":null,"intelligentId":"acadb770163e442db39fc060f09b0a8f","eventTypeid":null,"eventName":"电子围栏","eventNameList":null,"eventType":null,"eventTypeList":null,"eventColorLabel":null,"eventColorLabelList":null,"eventSourcet":"3","reportVideocode":"ef5a1b409739463ab9a3bd9fbf3431eb-0000","reportVideoName":"005-同步-智能任务-","eventPlace":"北京市朝阳区崔各庄乡黄胖子建材批发","coordinatesX":"116.47534366728631","coordinatesY":"40.01833157880153","deviceType":null,"eventGroupName":"乐活雅苑","eventGroupid":null,"eventGroupcode":null,"reportTime":"2022-11-04 12:51:28","misreportFlag":"0","reportFlag":"0","readFlag":"1","pushId":"255995531217481c8f0d2aeaae7e1c06","eventId":null,"eventAreaName":"北京市/乐活雅苑","eventAreaCode":null,"eventCommunity":"XQ000104","allGroupName":"北京保障房中心/应急指挥信息中心/安全应急部/运营主体1号/乐活雅苑","attachmentUrl":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AF14daaac53b4e4d49835975a4fb2197f0.jpg","attachmentUrlPublic":"http://39.155.134.150:10020/QuerySecuritySecneData?ImgID=AF14daaac53b4e4d49835975a4fb2197f0.jpg","attachmentName":"AF14daaac53b4e4d49835975a4fb2197f0.jpg"},{"pageSize":null,"pageNumber":null,"orderBy":null,"sort":null,"findAll":null,"intelligentId":"8030b110edf24df7b32b7756b14288e8","eventTypeid":null,"eventName":"电子围栏","eventNameList":null,"eventType":null,"eventTypeList":null,"eventColorLabel":null,"eventColorLabelList":null,"eventSourcet":"3","reportVideocode":"ef5a1b409739463ab9a3bd9fbf3431eb-0000","reportVideoName":"006-同步-智能任务-","eventPlace":"北京市朝阳区崔各庄乡黄胖子建材批发","coordinatesX":"116.47534366728631","coordinatesY":"40.01833157880153","deviceType":null,"eventGroupName":"乐活雅苑","eventGroupid":null,"eventGroupcode":null,"reportTime":"2022-11-16 18:39:25","misreportFlag":"0","reportFlag":"0","readFlag":"0","pushId":"092bc35e0b8247ec9194f52ef2394104","eventId":null,"eventAreaName":"北京市/乐活雅苑","eventAreaCode":null,"eventCommunity":"XQ000104","allGroupName":"北京保障房中心/应急指挥信息中心/安全应急部/运营主体1号/乐活雅苑","attachmentUrl":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AF42b105e91b9a4b4bab46b167f40ff152.jpg","attachmentUrlPublic":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AF42b105e91b9a4b4bab46b167f40ff152.jpg","attachmentName":"AF42b105e91b9a4b4bab46b167f40ff152.jpg"},{"pageSize":null,"pageNumber":null,"orderBy":null,"sort":null,"findAll":null,"intelligentId":"698d2fcd4a8b4963ac44148aebcbed1f","eventTypeid":null,"eventName":"电子围栏","eventNameList":null,"eventType":null,"eventTypeList":null,"eventColorLabel":null,"eventColorLabelList":null,"eventSourcet":"3","reportVideocode":"ef5a1b409739463ab9a3bd9fbf3431eb-0000","reportVideoName":"007-同步-智能任务-","eventPlace":"北京市朝阳区崔各庄乡黄胖子建材批发","coordinatesX":"116.47534366728631","coordinatesY":"40.01833157880153","deviceType":null,"eventGroupName":"乐活雅苑","eventGroupid":null,"eventGroupcode":null,"reportTime":"2022-11-07 11:31:26","misreportFlag":"0","reportFlag":"0","readFlag":"1","pushId":"117a56a63a5d4cd9b3eed6df906f0615","eventId":null,"eventAreaName":"北京市/乐活雅苑","eventAreaCode":null,"eventCommunity":"XQ000104","allGroupName":"北京保障房中心/应急指挥信息中心/安全应急部/运营主体1号/乐活雅苑","attachmentUrl":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AF7fe28f1d1dda4af5b19424b1e1cb0304.jpg","attachmentUrlPublic":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AF7fe28f1d1dda4af5b19424b1e1cb0304.jpg","attachmentName":"AF7fe28f1d1dda4af5b19424b1e1cb0304.jpg"},{"pageSize":null,"pageNumber":null,"orderBy":null,"sort":null,"findAll":null,"intelligentId":"a6d9a1504b704651b39a0ed5d4e541e5","eventTypeid":null,"eventName":"电子围栏","eventNameList":null,"eventType":null,"eventTypeList":null,"eventColorLabel":null,"eventColorLabelList":null,"eventSourcet":"3","reportVideocode":"ef5a1b409739463ab9a3bd9fbf3431eb-0000","reportVideoName":"008-同步-智能任务-","eventPlace":"北京市朝阳区崔各庄乡黄胖子建材批发","coordinatesX":"116.47534366728631","coordinatesY":"40.01833157880153","deviceType":null,"eventGroupName":"乐活雅苑","eventGroupid":null,"eventGroupcode":null,"reportTime":"2022-10-28 14:24:08","misreportFlag":"0","reportFlag":"0","readFlag":"1","pushId":"29f914c89b7d488a98dc064de85ee560","eventId":null,"eventAreaName":"北京市/乐活雅苑","eventAreaCode":null,"eventCommunity":"XQ000104","allGroupName":"北京保障房中心/应急指挥信息中心/安全应急部/运营主体1号/乐活雅苑","attachmentUrl":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AFfd44f3e13c7d4f358fa2d05deb12a455.jpg","attachmentUrlPublic":"http://39.155.134.150:10020/QuerySecuritySecneData?ImgID=AFfd44f3e13c7d4f358fa2d05deb12a455.jpg","attachmentName":"AFfd44f3e13c7d4f358fa2d05deb12a455.jpg"},{"pageSize":null,"pageNumber":null,"orderBy":null,"sort":null,"findAll":null,"intelligentId":"861e7f2174f742cea758629fb0ba0809","eventTypeid":null,"eventName":"电子围栏","eventNameList":null,"eventType":null,"eventTypeList":null,"eventColorLabel":null,"eventColorLabelList":null,"eventSourcet":"3","reportVideocode":"ef5a1b409739463ab9a3bd9fbf3431eb-0000","reportVideoName":"009-同步-智能任务-","eventPlace":"北京市朝阳区崔各庄乡黄胖子建材批发","coordinatesX":"116.47534366728631","coordinatesY":"40.01833157880153","deviceType":null,"eventGroupName":"乐活雅苑","eventGroupid":null,"eventGroupcode":null,"reportTime":"2022-11-10 15:46:12","misreportFlag":"0","reportFlag":"0","readFlag":"0","pushId":"1a82708fea7841febee4bd612f4f1b26","eventId":null,"eventAreaName":"北京市/乐活雅苑","eventAreaCode":null,"eventCommunity":"XQ000104","allGroupName":"北京保障房中心/应急指挥信息中心/安全应急部/运营主体1号/乐活雅苑","attachmentUrl":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AF5683203254bf4848a50fe3ab4d188697.jpg","attachmentUrlPublic":"http://172.16.96.44:10020/QuerySecuritySecneData?ImgID=AF5683203254bf4848a50fe3ab4d188697.jpg","attachmentName":"AF5683203254bf4848a50fe3ab4d188697.jpg"}]}');
    businessResponse.onSuccess<MultiSelectListBean>(bean, kGetMultiSelectListApi);
  }

  /// 分组列表
  void getGroupList(){
    GroupListBean bean = groupListBeanFromJson('{"total":0,"totalPage":1,"next":false,"items":[{"title":"2023年1月","result":[{"examRoomId":1,"examRoomName":"结构化考试","questionAmount":5,"userAmount":8,"onlineUserAmount":0,"examFormat":"标准结构化","beginTime":"06.07 08:00","examRoomStatus":"未上线"},{"examRoomId":3,"examRoomName":"结构化2","questionAmount":3,"userAmount":3,"onlineUserAmount":0,"examFormat":"标准结构化","beginTime":"06.07 08:00","examRoomStatus":"未上线"}]},{"title":"2023年2月","result":[{"examRoomId":1,"examRoomName":"结构化考试","questionAmount":5,"userAmount":8,"onlineUserAmount":0,"examFormat":"标准结构化","beginTime":"06.07 08:00","examRoomStatus":"未上线"},{"examRoomId":3,"examRoomName":"结构化2","questionAmount":3,"userAmount":3,"onlineUserAmount":0,"examFormat":"标准结构化","beginTime":"06.07 08:00","examRoomStatus":"未上线"}]},{"title":"2023年3月","result":[{"examRoomId":1,"examRoomName":"结构化考试","questionAmount":5,"userAmount":8,"onlineUserAmount":0,"examFormat":"标准结构化","beginTime":"06.07 08:00","examRoomStatus":"未上线"},{"examRoomId":3,"examRoomName":"结构化2","questionAmount":3,"userAmount":3,"onlineUserAmount":0,"examFormat":"标准结构化","beginTime":"06.07 08:00","examRoomStatus":"未上线"}]}]}');
    businessResponse.onSuccess<GroupListBean>(bean, kGetGroupListApi);
  }

  ///树形列表
  void getTreeList(){
    NodeBean bean = nodeBeanFromJson('{"id":"1","name":"北京保障房中心[在线:7/总数:7]","community":null,"icon":"-1","children":[{"id":"364399424","name":"应急指挥信息中心","community":null,"icon":"-1","children":[{"id":"510854137","name":"安全应急部","community":null,"icon":"-1","children":[{"id":"212682406","name":"运营主体1号","community":null,"icon":"-1","children":[{"id":"377697520","name":"朗悦嘉园","community":null,"icon":"-1","children":[],"pid":"212682406"},{"id":"541303582","name":"乐活雅苑","community":null,"icon":"-1","children":[],"pid":"212682406"},{"id":"407057795","name":"广渠门北里36号院","community":null,"icon":"-1","children":[],"pid":"212682406"}],"pid":"510854137"}],"pid":"364399424"}],"pid":"1"}],"pid":null}');
    businessResponse.onSuccess<NodeBean>(bean, kGetTreeList);
  }

  ///风格列表
  void getGridList(){
    GridListBean bean = gridListBeanFromJson('{"title":["Flutter单个文件上传","Flutter多个文件上传","Flutter下载","使用MethodChannel跳转原生WebView","使用BasicMessageChannel发消息给原生","原生功能测试","Flutter WebView","获取原生路径"]}');
    businessResponse.onSuccess<GridListBean>(bean, kGetGridList);
  }

  ///风格列表
  void getNativePathList(){
    NativePathBean bean = nativePathBeanFromJson('{"nativePathList":["Get Temporary Directory","Get Application Documents Directory","Get Application Support Directory","Get Application Library Directory","Get Application Cache Directory","Get External Storage Directory","Get External Storage Directories","Get External Cache Directories","Get Downloads Directory"]}');
    businessResponse.onSuccess<NativePathBean>(bean, kGetNativePathList);
  }
  
}